package edu.zbtc.ie.sunxd.prac0615;

import java.util.ArrayList;
import java.util.List;

public class MarkLab {
    public List<Mark> getMarks() {
        return mMarks;
    }

    private List<Mark> mMarks;
    private MarkLab() {
        mMarks = new ArrayList<>();
        for (int i = 0; i < 50; i++) {
            Mark m = new Mark();
            m.setStudentID(i + 1);
            m.setChinese((int)(Math.random() * 150));
            m.setMath((int)(Math.random() * 150));
            m.setEnglish((int)(Math.random() * 150));
            m.setNature((int)(Math.random() * 300));
            mMarks.add(m);
        }
    }
    private static MarkLab sInstance;
    public static MarkLab get() {
        if (sInstance == null) {
            sInstance = new MarkLab();
        }
        return sInstance;
    }
}
